/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hiof.moraa.server.service.model;

import java.util.Date;
import org.jivesoftware.smack.packet.Message;

/**
 *
 * @author manish
 */
public class TextMessageFeed extends Feed {

    private Message message;
    private String receiver;

    public TextMessageFeed(int userId, String userName, String fullname, String profilePicture, Date timestamp, String receiver, Message message) {
        super(userId, userName, fullname, profilePicture, timestamp);
        this.receiver = receiver;
        this.message = message;
    }

    public Message getMessage() {
        return message;
    }

    public void setMessage(Message message) {
        this.message = message;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    @Override
    public String getDescription() {
        return getUsername() + " says to " + receiver + message.getBody();
    }

    @Override
    public String getType() {
        return "TextMessageFeed";
    }
}
